package priv.lirenhe.dissertation.z_testforthepro;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

/**
 * 插入换行符的测试
 * @author lenovo
 *
 */

public class _091_Test_IO {
	public static void main(String[] args) {
		
		String url = "http://aaa";
		
		File file = null;
		BufferedWriter bw = null;
		
		try {
			file = new File("C:\\Users\\lenovo\\Desktop\\html-jsp\\test.txt");
			
			bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file,true)));
			bw.newLine();
			bw.write(url);
			
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			if(bw != null){
				try {
					bw.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		
	}
}
